import { useMergedState as useMountMergeState } from '@rc-component/util';
import bem from './bem';
import useClickAway from './hooks/useClickAway';
import { merge } from './merge';
import { usePrevious } from './hooks/usePrevious';
import { useRefFunction } from './hooks/useRefFunction';
import { useDebounceFn } from './hooks/useDebounceFn';
import useFetchData from './hooks/useFetchData';
import { isNil } from './isNil';
import { isImg } from './isImg';
import { parseQueryString, centsToYuan, yuanToCents, commonUtils } from './common';
import { nanoid as genUUID } from './nanoid';

const isEmpty = (obj: any): boolean => {
    return isNil(obj);
}

const isNotEmpty = (obj: any): boolean => {
    return !isEmpty(obj);
}

export {
    bem,
    genUUID,
    parseQueryString,
    centsToYuan,
    yuanToCents,
    merge,
    isEmpty,
    isNotEmpty,
    isImg,
    useClickAway,
    useFetchData,
    useMountMergeState,
    usePrevious,
    useRefFunction,
    useDebounceFn,
    commonUtils,
};